Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(and, app(p, x)), app(app(forall, p), xs))
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forall, p), app(app(cons, x), xs)) → APP(and, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(or, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(or, app(p, x)), app(app(forsome, p), xs))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(and, app(p, x)), app(app(forall, p), xs))
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forall, p), app(app(cons, x), xs)) → APP(and, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(or, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(or, app(p, x)), app(app(forsome, p), xs))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(and, app(p, x)), app(app(forall, p), xs))
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forall, p), app(app(cons, x), xs)) → APP(and, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(or, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(or, app(p, x)), app(app(forsome, p), xs))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 4 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
QDP
                  ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
The remaining pairs can at least be oriented weakly.

APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)
Used ordering: Combined order from the following AFS and order.
APP(x1, x2)  =  APP(x1)
app(x1, x2)  =  app(x1, x2)
forall  =  forall
cons  =  cons
forsome  =  forsome

Lexicographic Path Order [19].
Precedence:
forall > APP1 > app2
cons > APP1 > app2
forsome > APP1 > app2

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
QDP
                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 2 SCCs.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
QDP
                            ↳ QDPOrderProof
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

FORSOME(p, cons(x, xs)) → FORSOME(p, xs)

R is empty.
The set Q consists of the following terms:

and(true, true)
and(x0, false)
and(false, x0)
or(true, x0)
or(x0, true)
or(false, false)
forall(x0, nil)
forall(x0, cons(x1, x2))
forsome(x0, nil)
forsome(x0, cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
FORSOME(x1, x2)  =  FORSOME(x2)
cons(x1, x2)  =  cons(x1, x2)

Lexicographic Path Order [19].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ PisEmptyProof
                          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

FORALL(p, cons(x, xs)) → FORALL(p, xs)

R is empty.
The set Q consists of the following terms:

and(true, true)
and(x0, false)
and(false, x0)
or(true, x0)
or(x0, true)
or(false, false)
forall(x0, nil)
forall(x0, cons(x1, x2))
forsome(x0, nil)
forsome(x0, cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
FORALL(x1, x2)  =  FORALL(x2)
cons(x1, x2)  =  cons(x1, x2)

Lexicographic Path Order [19].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, x), false) → false
app(app(and, false), y) → false
app(app(or, true), y) → true
app(app(or, x), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, x0), false)
app(app(and, false), x0)
app(app(or, true), x0)
app(app(or, x0), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.